<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" lang="zh-CN">

<div th:fragment="content">
    <div class="form-group">
        <div class="row">
            <div class="col-md-4">
                <label class="col-sm-3 control-label text-right">Insert</label>
                <div class="col-sm-9">
                    <input name="timingInsert" type="text" class="form-control" data-role="tagsinput" th:value="${mapping?.listener?.insert}?:'I'" />
                </div>
            </div>
            <div class="col-md-4">
                <label class="col-sm-3 control-label text-right">Update</label>
                <div class="col-sm-9">
                    <input name="timingUpdate" type="text" class="form-control" data-role="tagsinput" th:value="${mapping?.listener?.update}?:'U'"/>
                </div>
            </div>
            <div class="col-md-4">
                <label class="col-sm-3 control-label text-right">Delete</label>
                <div class="col-sm-9">
                    <input name="timingDelete" type="text" class="form-control" data-role="tagsinput" th:value="${mapping?.listener?.delete?:'D'}"/>
                </div>
            </div>
        </div>
    </div>

    <div class="form-group">
        <div class="row">
            <div class="col-md-4">
                <label class="col-sm-3 control-label text-right">Cron<strong class="text-primary">*</strong></label>
                <div class="col-sm-9">
                    <input class="form-control" dbsyncer-valid="require" name="timingCronExpression"
                           th:value="${mapping?.listener?.cron}?:'*/30 * * * * ?'" type="text"/>
                </div>
            </div>
            <div class="col-md-4">
                <label class="col-sm-3 control-label text-right">事件</label>
                <div class="col-sm-9" title="区分增删改">
                    <select name="timingEventFieldName" class="form-control select-control-default">
                        <option value="" selected="selected">无</option>
                        <option th:each="c,s:${mapping?.sourceColumn}" th:value="${c?.name}" th:text="${c?.name} +' (' + ${c?.typeName} +')'" th:selected="${c.name eq mapping?.listener?.eventFieldName}"/>
                    </select>
                </div>
            </div>
            <div class="col-md-4"></div>
        </div>
    </div>

</div>

</html>